#include "trans.h"
#include <stdio.h>
#include <iostream>


Matrix14f PositionMatrix(float x,float y,float z){
    Matrix14f ret;
    ret<<x,y,z,1;
    return ret;
}
Matrix41f PositionMatrix41(float x,float y,float z){
    Matrix41f ret;
    ret<<x,y,z,1;
    return ret;
}

Matrix44f RotateX(float x){
    Matrix44f ret;
    ret<<   1,0,0,0,
            0,cos(x),-sin(x),0,
            0,sin(x),cos(x),0,
            0,0,0,1;
    return ret;
}
Matrix44f RotateY(float x){
    Matrix44f ret;
    ret<<   cos(x),0,sin(x),0,
            0,1,0,0,
            -sin(x),0,cos(x),0,
            0,0,0,1;
    //cout<<ret;
    return ret;
}

Matrix44f RotateZ(float x){
    Matrix44f ret;
    ret<<   cos(x),-sin(x),0,0,
            sin(x),cos(x),0,0,
            0,0,1,0,
            0,0,0,1;
    //cout<<ret;
    return ret;
}

Matrix44f Move(float x,float y,float z){
    Matrix44f ret;
    ret<<   1,0,0,x,
            0,1,0,y,
            0,0,1,z,
            0,0,0,1;
    //cout<<ret;
    return ret;
}

Matrix44f Origin(){
    Matrix44f ret;
    ret<<   1,0,0,0,
            0,1,0,0,
            0,0,1,0,
            0,0,0,1;
    //cout<<ret;
    return ret;
}
